﻿@model GameSchool.Models.ViewModels.HandInViewModel
 
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>        
<link rel="stylesheet" type="text/css" href="/Content/css/handins.css" />
@using (Html.BeginForm()) {
    <fieldset>
<legend>Verkefni: @Model.title</legend>

        <section class="one-half">          
             
             <div class="formTitle">
            <h2>Stig í boði: @Html.DisplayFor(model => model.maxpoints)</h2> 
            </div>
            
            <div class="ifCompleted">
            @if (Model.completed == true)
            {
                    <h2>Stig sem þú fékkst: @Html.DisplayFor(model => model.points) </h2>
            }
            else
            {
                    <h3>Þú hefur ekki skilað verkefninu/Ekki er búið að gefa stig</h3>
            }
            </div>

              <div class="formTitle">
            <h2>Athugasemdir:</h2>
        </div>
        <div class="studentComment">
        @Html.TextAreaFor(model => model.usercomment, new { style = "Width: 100%; resize:none;"})
        @Html.ValidationMessageFor(model => model.usercomment)
        </div>
            
       </section>

       <section class="one-half last">

       <div class="formTitle">
            <h2>Lýsing:</h2>
       </div>
        <div class="handinDescription">
              @Html.DisplayFor(model => model.descr)
        </div>    
                   
        @Html.HiddenFor(model => model.assignmentID)

      

        <div class="formTitle" id="uploadTitle">
            <h2>Skrá:</h2>
        </div>
           <div class="uploadFile">
            <input type="file" name="fileUpload" id="handInUpload" />
            <input type="submit" value="Vista" class="sendbutton" name="sendbutton" /> 
        </div>
        @Html.HiddenFor(model => model.returnpath)
        @Html.ValidationMessageFor(model => model.returnpath)
        </section>

       
</fieldset>
}

 @section FooterScript
 {
        <script type="text/javascript">
                $(document).ready(function () {

                    GetCoursePoints(@ViewData["courseID"]);
                });

        </script>

    }